import request from './request'
// 温湿度新增
export const tahDeviceAdd = (addTahDevice) => {
  return request({
    url: '/tahDevice/add',
    method: 'post',
    data: addTahDevice,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 温湿度列表
export const tahDeviceList = (params) => {
  return request({
    url: '/tahDevice/list',
    method: 'get',
    param: params,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 温湿度监控详情
export const styDetail = (deviceId) => {
  return request({
    url: '/tahDevice/detail',
    method: 'get',
    param: {
      deviceId
    },
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 修改温湿度监控详情
export const tahDeviceUpdate = (updateTahDevice) => {
  return request({
    url: '/tahDevice/update',
    method: 'post',
    data: updateTahDevice,
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}

// 删除温湿度监控器
export const tahDeviceDelete = (deviceId) => {
  return request({
    url: '/tahDevice/delete',
    method: 'get',
    param: {
      deviceId
    },
    headers: {
      isToken: true,
      repeatSubmit: false
    }
  })
}
